package com.hippo.module.sys.service.impl;

import com.github.pagehelper.PageInfo;
import com.hippo.api.sys.entity.DistrictEntity;
import com.hippo.common.base.util.PageUtil;
import com.hippo.module.sys.dao.DistrictDao;
import com.hippo.module.sys.service.DistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DistrictServiceImpl  implements DistrictService {

    @Autowired
    private DistrictDao districtDao;
    /**
     * 根据条件分页查询
     * @param parameter
     * @return
     */
    public PageInfo<DistrictEntity> queryDistrictByConditionPaging(DistrictEntity parameter){
        return PageUtil.createPageQuery(parameter,()->this.districtDao.queryDistrictByConditionPaging(parameter));
    }
}
